var btn = document.getElementById("btn");
btn.onclick=function(){
    var username = document.getElementById("username").value;
    var password = document.getElementById("password").value;
    $.ajax({
        type:"get",
        url:"https://6711bd6d00698609413e76b7.hz-iframe-svc.simplelab.cn/login",
        data : {
            username : username,
            password : password,
        },
        success : function(msg){
            if(msg.code == 200){
                alert("登陆成功");
                window.location.href="http://127.0.0.1:5500/webpack-demo/src/index1.html"
            }else{
                alert("登录失败")
            }
        }
    })
}